<html>
<head><meta charset="utf-8"><title>Show function assembly command · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Show.20function.20assembly.20command.html">Show function assembly command</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="243698306"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Show%20function%20assembly%20command/near/243698306" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Show.20function.20assembly.20command.html#243698306">(Jun 23 2021 at 19:07)</a>:</h4>
<p>I frequently work on high performance programs, and it would really help knowing if something autovectorized or not, i was wondering if it would be in-scope to have RA be able to (through cargo asm maybe if installed?) show a function's assembly in a separate window on demand. It gets really hard to find the asm of something quickly if you have a big project like i do, so this would be incredibly helpful.</p>



<a name="243712303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Show%20function%20assembly%20command/near/243712303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Show.20function.20assembly.20command.html#243712303">(Jun 23 2021 at 21:00)</a>:</h4>
<p>It’s in scope eventually, but not in the near term. That said, if someone submits a PR which a simple implementation which just shells out to cargo asm, I don’t see a reason to not merge it.</p>



<a name="243718806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Show%20function%20assembly%20command/near/243718806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Show.20function.20assembly.20command.html#243718806">(Jun 23 2021 at 22:00)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> by "in scope" do you mean a more elegant way of doing it by interfacing with rustc internals/rustc itself? doing it with cargo asm would prob just be with a <code>Command</code> right?</p>



<a name="243756413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Show%20function%20assembly%20command/near/243756413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Show.20function.20assembly.20command.html#243756413">(Jun 24 2021 at 08:41)</a>:</h4>
<p>Yeah, long term, ra should just call into backend to compile one single funciton. Short-term, Command::new("cargo").arg("asm") is the way to go</p>



<a name="243824791"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Show%20function%20assembly%20command/near/243824791" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Show.20function.20assembly.20command.html#243824791">(Jun 24 2021 at 18:10)</a>:</h4>
<p>Hmmm, i thought RA did not "communicate" with rustc at all other than running cargo check, does it actually use parts of rustc as a library?</p>



<a name="243832804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Show%20function%20assembly%20command/near/243832804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Show.20function.20assembly.20command.html#243832804">(Jun 24 2021 at 19:11)</a>:</h4>
<p>only a select few parts of rustc that build on stable like the lexer and the (likely) future trait solver chalk.</p>



<a name="243833602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Show%20function%20assembly%20command/near/243833602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Show.20function.20assembly.20command.html#243833602">(Jun 24 2021 at 19:18)</a>:</h4>
<p>We are not at the moment, but long term we'll assimilate rustc</p>



<a name="243844637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Show%20function%20assembly%20command/near/243844637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Show.20function.20assembly.20command.html#243844637">(Jun 24 2021 at 20:50)</a>:</h4>
<p>is long term plans to become another "rustc tool" that updates along with rustc similar to rustdoc?</p>



<a name="243845051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Show%20function%20assembly%20command/near/243845051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Show.20function.20assembly.20command.html#243845051">(Jun 24 2021 at 20:53)</a>:</h4>
<p>On the very highest-level -- yes. But this is so long term that its impossible to predict how this'll pay out.</p>



<a name="243845087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Show%20function%20assembly%20command/near/243845087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Show.20function.20assembly.20command.html#243845087">(Jun 24 2021 at 20:53)</a>:</h4>
<p>rust-analyzer is already available as rustup component on nightly.</p>



<a name="243845174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Show%20function%20assembly%20command/near/243845174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Show.20function.20assembly.20command.html#243845174">(Jun 24 2021 at 20:54)</a>:</h4>
<p>i dont get how anyone can coordinate issues/prs across like 20 different things in the rust repository lol</p>



<a name="243845372"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Show%20function%20assembly%20command/near/243845372" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Show.20function.20assembly.20command.html#243845372">(Jun 24 2021 at 20:56)</a>:</h4>
<p>there is a reason we have &gt;50k issues on gh :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>